<extend name="Public/publicHTML" />

<block name='content'>
<link href="__COMMON__/daterangepicker/daterangepicker-bs3.css"
	rel="stylesheet" type="text/css" />
<script src="__COMMON__/daterangepicker/moment.min.js"
	type="text/javascript"></script> <script
	src="__COMMON__/daterangepicker/daterangepicker.js"
	type="text/javascript"></script>
<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />


<section class="content ">
	<!-- Main content -->
	<div class="container-fluid">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					<i class="fa fa-list"></i> 添加优惠券
				</h3>
			</div>
			<div class="panel-body ">
				<!--表单数据-->
				<form  method="post" id="form">
					<!--通用信息-->
					<div class="tab-content col-md-10">
						<div class="tab-pane active" id="tab_tongyong">
							<table class="table table-bordered">
								<tbody>
									<tr>
										<td class="col-sm-2">优惠券名称：</td>
										<td class="col-sm-4"><input type="text"
											class="form-control" id="name" name="{$conponModel::$name_d}"> <span
											id="err_attr_name"  class="rxd"></span></td>
										<td class="col-sm-4">请填写优惠券名称</td>
									</tr>
									<tr>
										<td>优惠券面额：</td>
										<td><input type="text" class="form-control" id="money"
											name="{$conponModel::$money_d}"
											onpaste="this.value=this.value.replace(/[^\d.]/g,'')"
											onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" /></td>
										<td class="col-sm-4">优惠券可抵扣金额</td>
									</tr>
									<tr>
										<td>消费金额：</td>
										<td><input type="text" class="form-control active"
											id="condition" name="{$conponModel::$condition_d}"
											onpaste="this.value=this.value.replace(/[^\d.]/g,'')"
											onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" /></td>
										<td class="col-sm-4">订单需满足的最低消费金额(必需为整数)才能使用</td>
									</tr>
									<tr>
										<td>发放类型:</td>
										<td id="order-status"><input name="{$conponModel::$type_d}" type="radio"
											value="0">面额模板 <input name="{$conponModel::$type_d}" type="radio"
											value="1">按用户发放 <input name="{$conponModel::$type_d}"
											type="radio" value="2">注册发放 <input
											name="{$conponModel::$type_d}" type="radio" value="3">邀请发放 <input
											name="{$conponModel::$type_d}" type="radio" value="4">线下发放</td>
									</tr>
									<tr>
										<td>发放数量:</td>
										<td><input type="text" class="form-control"
											id="createnum" name="{$conponModel::$createnum_d}" placeholder="0"
											onpaste="this.value=this.value.replace(/[^\d]/g,'')"
											onkeyup="this.value=this.value.replace(/[^\d]/g,'')" /></td>
										<td class="col-sm-4">发放数量限制(默认为0则无限制)</td>
									</tr>
									<tr class="timed">
										<td>发放起始日期:</td>
										<td>
											<div class="input-prepend input-group">
												<span class="add-on input-group-addon"> <i
													class="glyphicon glyphicon-calendar fa fa-calendar"> </i>
												</span> <input type="text"
													class="form-control" id="send_start_time"
													name="{$conponModel::$sendStart_time_d}">
											</div>
										</td>
										<td class="col-sm-4"></td>
									</tr>

									<tr class="timed">
										<td>发放结束日期:</td>
										<td>
											<div class="input-prepend input-group">
												<span class="add-on input-group-addon"> <i
													class="glyphicon glyphicon-calendar fa fa-calendar"> </i>
												</span> <input type="text"
													class="form-control" id="send_end_time"
													name="{$conponModel::$sendEnd_time_d}">
											</div>
										</td>
										<td class="col-sm-4"></td>
									</tr>
									<tr>
										<td>使用起始日期:</td>
										<td>
											<div class="input-prepend input-group">
												<span class="add-on input-group-addon"> <i
													class="glyphicon glyphicon-calendar fa fa-calendar"></i>
												</span> <input type="text"
													class="form-control" id="use_start_time"
													name="{$conponModel::$useStart_time_d}">
											</div>
										</td>
										<td class="col-sm-4"></td>
									</tr>
									<tr>
										<td>使用结束日期:</td>
										<td>
											<div class="input-prepend input-group">
												<span class="add-on input-group-addon"> <i
													class="glyphicon glyphicon-calendar fa fa-calendar"></i>
												</span> <input type="text"
													class="form-control" id="use_end_time" name="{$conponModel::$useEnd_time_d}">
											</div>
										</td>
										<td class="col-sm-4"></td>
									</tr>
								</tbody>
								<tfoot>
									<tr>
										<td class="col-sm-4"></td>
										<td class="text-right"><input class="btn btn-primary"
											type="button" onclick="Conpon.addConpon('{:U('addCouponData')}', 'form');" value="保存"></td>
									</tr>
								</tfoot>
							</table>
						</div>
					</div>
				</form>
				<!--表单数据-->
			</div>
		</div>
	</div>
</section>
<script src="__COMMON__/js/jquery-form.js"></script>
<script src="__COMMON__/js/alert.js"></script> 
<script src="__JS__/conpon/conpon.js"></script> </block>